<template>
	<view class="page">
		<view class="header-wrapper">
			<image class="bg" src="../../static/my/header-bg.png" mode=""></image>
			<view class="content">
				<view class="item">
					<view>
						<image :src="vuex_user_content.my_avatar"></image>
						<view class="f12 cf" style="text-align: center;">{{ vuex_user_content.my_nickname }}</view>
					</view>
				</view>
				<view style="text-align: center;" class="">
					<view style="text-align: right;margin-right: 20px;line-height: 0;">
						<image src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/user/1.png" mode="widthFix" style="width: 24px;"></image>
					</view>
					<view class="f16 fb cf">
						开始时间
						<!--<image src="https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/bianji.png" style="width: 14px; margin-left: 6px; " mode="widthFix"></image>-->
					</view>
					<view class="f14 cf">
						<view>{{ vuex_user_content.createtime }}</view>
					</view>
				</view>
				<view class="item">
					<view>
						<image :src="vuex_user_content.ta_avatar"></image>
						<view class="f12 cf" style="text-align: center;">{{ vuex_user_content.ta_nickname }}</view>
					</view>
				</view>
			</view>
		</view>
		<view style="margin-top: 10px; width:90%;margin:10px auto;background: url(../../static/my/nav-vg.png);background-size: 100% 100%;">
			<u-cell-group>
				<u-cell-item :border-bottom="false" @click="all('/pages/ziliao/ziliao')" title="空间资料" arrow-direction="right">
					<image slot="icon" src="../../static/my/kjzl.png" mode="widthFix" style="width: 24px;margin-right: 8px;"></image>
				</u-cell-item>
				<u-cell-item :border-bottom="false" @click="all('/pages/jiechu/jiechu')" title="解除关系" arrow-direction="right">
					<image slot="icon" src="../../static/my/jcgx.png" mode="widthFix" style="width: 24px;margin-right: 10px;"></image>
				</u-cell-item>
				<u-cell-item :border-bottom="false" @click="all('/pages/bangzhu/bangzhu')" title="帮助中心" arrow-direction="right">
					<image slot="icon" src="../../static/my/bzzx.png" mode="widthFix" style="width: 20px;margin-right: 12px;margin-left: 2px;"></image>
				</u-cell-item>
				<u-cell-item :border-bottom="false" @click="all('/pages/liwu/liwu')" title="礼物中心" arrow-direction="right">
					<image slot="icon" src="../../static/my/lwzx.png" mode="widthFix" style="width: 24px;margin-right: 10px;"></image>
				</u-cell-item>
				<u-cell-item @click="qingchu" :border-bottom="false" title="清理缓存" arrow-direction="right" class="hc">
					<image slot="icon" src="../../static/my/qchc.png" mode="widthFix" style="width: 24px;margin-right: 10px;"></image>
				</u-cell-item>
			</u-cell-group>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {};
	},
	onLoad() {
		uni.setNavigationBarColor({
			frontColor: '#ffffff',
			backgroundColor: '#fa1e8a'
		});
		console.log(this.vuex_user_content);
	},
	methods: {
		all(e) {
			let self = this;

			// 解除关系
			if (e == '/pages/jiechu/jiechu') {
				// #ifdef MP
				if (self.vuex_site_config.sub_msg_dissolve_relationship.wechat) {
					uni.requestSubscribeMessage({
						tmplIds: [self.vuex_site_config.sub_msg_dissolve_relationship.wechat],
						success(res) {}
					});
				}
				// #endif

				// #ifdef MP-TOUTIAO
				if (self.vuex_site_config.sub_msg_dissolve_relationship.byte) {
					tt.requestSubscribeMessage({
						tmplIds: [self.vuex_site_config.sub_msg_dissolve_relationship.byte],
						success(res) {}
					});
				}
				// #endif
			}

			// 礼物中心
			if (e == '/pages/liwu/liwu') {
				// #ifdef MP
				if (self.vuex_site_config.sub_msg_gift.wechat) {
					uni.requestSubscribeMessage({
						tmplIds: [self.vuex_site_config.sub_msg_gift.wechat],
						success(res) {}
					});
				}
				// #endif

				// #ifdef MP-TOUTIAO
				if (self.vuex_site_config.sub_msg_gift.byte) {
					tt.requestSubscribeMessage({
						tmplIds: [self.vuex_site_config.sub_msg_gift.byte],
						success(res) {}
					});
				}
				// #endif
			}

			uni.navigateTo({
				url: e
			});
		},
		qingchu() {
			uni.showToast({
				title: '清除成功',
				icon: 'none'
			});
		}
	}
};
</script>

<style scoped lang="scss">
.page {
	height: 100vh;
	background: linear-gradient(to bottom, #fbd6e3, #a9ede9);
}
/deep/ .u-cell-item-box {
	background-color: transparent !important;
	padding: 40rpx 0 40rpx 40rpx;
}
/deep/ .u-cell {
	border-bottom: 1px solid #eeeff7;
	width: 90% !important;
	margin-left: 5%;
	padding-left: 0 !important;
	padding-right: 0 !important;
}
.hc /deep/ .u-cell {
	border-bottom: none;
}
.header-wrapper {
	position: relative;
	image.bg {
		width: 200%;
		height: 650rpx;
		margin: 0 auto;
		margin-left: -44%;
		margin-top: -20rpx;
	}
	.content {
		width: 90%;
		display: flex;
		justify-content: space-between;
		position: absolute;
		bottom: 180rpx;
		left: 50%;
		transform: translateX(-50%);
		.item {
			margin-top: -50rpx;
			view {
				display: flex;
				flex-direction: column;
				align-items: center;
			}
		}
		image {
			width: 55px;
			height: 55px;
			border-radius: 50%;
			box-sizing: border-box;
		}
	}
}
</style>
